﻿using BilbilDAL;
using Common;
using Modles.DTO;
using Modles.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BilbilBLL
{
    public class AccountService
    {
        public ResponseTool Login(Login_DTO model)
        {
            AccountDAL accountDAL = new AccountDAL();
            UserInfo userInfo = accountDAL.Login(model);
            if(userInfo != null)
            {
                return ResponseTool.Succeed(userInfo);
            }
            else
            {
                return ResponseTool.Fail("账号或密码错误");
            }
        }
    }
}
